/**
 * Copyright (C), 2015-2019, XXX有限公司
 * FileName: Card
 * Author:   pc
 * Date:     2019/9/18 16:35
 * Description:
 * History:
 * <author>          <time>          <version>          <desc>
 * 作者姓名           修改时间           版本号              描述
 */
package com.example.rabbitmqdemo.lock;


import com.example.rabbitmqdemo.service.AcountService;
import org.apache.catalina.core.ApplicationContext;
import org.apache.shiro.authc.Account;
import org.apache.shiro.authc.SimpleAccount;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * 〈功能：〉<br> 
 * 〈〉
 * @author liuhaoran
 * @create 2019/9/18 16:35
 * @since 1.0.0
 */
public class Card implements Runnable{
	@Autowired
	AcountService acountService;
	private String name;
	public Card(String name) {
		this.name = name;
	}
	@Override
	public void run() {
		while (true) {
			try {
				Thread.sleep(1000);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
			acountService.addAcount(name, 100);
		}
	}
}